#include "main.h"
#include "CThreadMain.h"
#include "mcu_dda_server.h"
#include "ManModbus.h"
#include "Function.h"

extern ManModbus		 g_manModbus;

void ddaServerInit(){
    DdaServer_InitTypeDef ddaServerInit;
    ddaServerInit.ddaServerType = DDA_SERVER_TYPE_MODBUS;
    ddaServerInit.comPort = 1;
    ddaServerInit.is485=1;
    ddaServerInit.slaveAddr=g_manModbus.address;
    DdaServerOpen(&ddaServerInit);
}



void CThreadMain::Run(void){
    m_running = TRUE;
    mcuInit();
    ddaServerInit();
    while(true) {

        RtxDelay(5000);
    }
}



